import 'package:flutter/cupertino.dart';
import 'package:love_app/common/su.dart';
import 'package:love_app/common/su_dio.dart';
import 'package:love_app/config/path_url.dart';
import 'package:love_app/model/love_gallery_model.dart';
import 'package:love_app/model/response_model.dart';

// 获取恋爱相册接口
class LoveGalleryApi{

  // 获取恋爱相册
  Future<LoveGalleryModel> loveGallery(String token, {@required int page}) async {
    
    String path = PathUrl.loveGallery + "/page/$page";
    Map header = {
      'X-Auth-Token': token,
    };
    ResponseModel responseModel = await SuDio().getRequest(path, headersMap: header);
    LoveGalleryModel loveGalleryModel = LoveGalleryModel.fromJson(responseModel.toJsonModel);
    return loveGalleryModel;
  }
}